<!DOCTYPE html>
<html lang="en-US">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <link rel="shortcut icon" href="favicon.ico">
    <link href="/state/css/bootstrap.min14ed.css" rel="stylesheet">
    <link href="/state/css/style.min.css" rel="stylesheet">
    <link href="/state/css/plugins/switchery/switchery.css" rel="stylesheet">
    <!-- 加载编辑器的容器 -->

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form method="post" id="form1" name="form1" class="form-horizontal" action="/adminchy/Reward/editSolitairePrize">
                        
                        <input hidden="true" name="prize_id" value="{$prizeInfo.prize_id}">
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">房间名称:</label>
                            <div class="col-sm-3">
                                <input readonly="readonly" type="text" class="form-control" placeholder="必填" id="room_name" name="room_name" value="{$prizeInfo.room_name}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">抢到的金额或雷的个数:</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" placeholder="必填" id="snatch_money" name="snatch_money" value="{$prizeInfo.snatch_money}">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">类型:</label>
                            <div class="col-sm-3">
                                <select class="form-control" id="type" name="type">
                                    <option value="1" {if $prizeInfo.type==1} selected {/if}>发包者奖励</option>
                                    <option value="2" {if $prizeInfo.type==2} selected {/if}>抢包者奖励</option>

                                </select>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">奖励金额:</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" placeholder="必填" id="prize_money" name="prize_money" value="{$prizeInfo.prize_money}">
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="submit">确认修改</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/state/js/jquery.min.js"></script>
<script src="/state/js/jquery.form.js"></script>
<script src="/state/js/plugins/layer/layer.min.js"></script>
<script src="/state/js/common.js"></script>
<script>
    $(function(){
        $('#form1').ajaxForm({
            //beforeSubmit: checkFun,
            success: complete,
            dataType: 'json'
        });
       $("#type").find("option:selected").val();

        function complete(data){
            if(data.status == 0){
                layer.msg(data.message, {icon: 6,time:1000},function(){
                    window.location.href="/adminchy/Reward/solitaireRewardList";
                 });
            }else{
                layer.msg(data.message, {icon: 5,time:1000},function(){
                    location.reload();
                 });
            }
             
        }
    })
</script>
</body>
</html>
